<div class="backing-service-instance" ng-repeat="items in myservice">
    <div ng-show="items.isshow">
        <!--<h2 id=t{{items.id}} class="h2-border" ng-show="items.showTab">-->
            <!--{{items.name}}-->
        <!--</h2>-->
        <div id=t{{items.id}} class="h2-border" ng-show="items.showTab"
             style="margin-bottom: 15px;">
            <span class='biaoti'>{{items.name}}</span>
            <i class='xian'></i>
        </div>
        <div class="instance" ng-repeat="item in items.item | myfilter:isComplete">
            <div class="instance-bar">
                <div class="row">
                    <div class="ban4 pan">
                        <h3>{{item.metadata.name}}</h3>
                        <p>{{item.spec.provisioning.backingservice_name}}</p>
                    </div>
                    <div class="ban4">
                        <p>状态: {{item.status.phase | bsiphaseFilter}}</p>
                        <p><span uib-tooltip="{{item.metadata.creationTimestamp | timescon}}">创建时间: {{item.metadata.creationTimestamp | dateRelative}}</span></p>
                    </div>
                    <div class="ban4">
                        <p>套餐名称:
                            <a ui-sref="console.backing_service_detail({name:item.spec.provisioning.backingservice_name, plan: item.spec.provisioning.backingservice_plan_name})"
                                class="href-orange">{{item.spec.provisioning.backingservice_plan_name}}</a></p>
                        <p>绑定服务个数: {{item.spec.bound}}</p>
                    </div>
                    <div class="ban4">
                        <a href="javascript:;" ng-click="item.show=!item.show" class="fa2 fa2-link"
                           uib-tooltip="服务绑定"></a>
                        <!--<a ui-sref="console.backing_service_detail({name:item.spec.provisioning.backingservice_name, plan: item.spec.provisioning.backingservice_plan_name, update: true})" class="fa2 fa2-update" uib-tooltip="升级套餐"></a>-->
                        <a ng-if="item.spec.provisioning.dashboard_url" href="{{item.spec.provisioning.dashboard_url}}" target="_blank" class="fa2 fa2-dashboard"
                           uib-tooltip="Dashboard"></a>

                        <a href="javascript:;" class="faa faa-times" uib-tooltip="删除"
                           ng-click="delBsi($index,items.id)"></a>
                    </div>
                </div>
            </div>

            <div class="binding-services" uib-collapse="!item.show">
                <div style="padding: 30px;">
                    <h2>
                        绑定服务
                        <a href="javascript:;" class="btn btn-orange" ng-click="delBing($index,items.id)">解除绑定</a>
                        <a href="javascript:;" class="btn btn-gray" style="background-color:#fff;color: white" ng-if="item.status.phase==='Provisioning'">新增绑定</a>
                        <a href="javascript:;" class="btn btn-green" ng-if="item.status.phase!=='Provisioning'" ng-click="bindModal($index,items.id)">新增绑定</a>
                    </h2>
                    <div class="panel-group" role="tablist" aria-multiselectable="true" style="margin-bottom: 0;">
                        <div class="panel panel-default" ng-repeat="bsisv in item.spec.binding">
                            <div class="panel-heading" role="tab">
                                <h4 class="panel-title">
                                    <a ng-class="{'active': bsisv.checked}" ng-click="bsisv.checked=!bsisv.checked"
                                       style="cursor: pointer">
                                        <i class="faa faa-check"></i>&nbsp;
                                    </a>
                                    <a href="#{{item.metadata.name}}-{{bsisv.bind_deploymentconfig}}"
                                       data-toggle="collapse"
                                       class="accordion-toggle">
                                        {{bsisv.bind_deploymentconfig}}
                                        <i class="fa pull-right"
                                           ng-class="{'fa-caret-up': status.open, 'fa-caret-down': !status.open}"
                                           style="color: #5a6378;"></i>
                                    </a>
                                <span class="label label-default" uib-tooltip="{{bsisv.bound_time | timescon}}">
                                    <i class="fa2 fa2-time"></i>&nbsp;{{bsisv.bound_time | dateRelative}}
                                </span>
                                    <span style="margin-left: 10px;" ng-if="bsisv.delete" class="icon12 icon12-Bound fa-unspin"></span>
                                    <!--<span>{{bsisv.delete}}</span>-->
                                </h4>
                            </div>
                            <div id="{{item.metadata.name}}-{{bsisv.bind_deploymentconfig}}"
                                 class="panel-collapse collapse"
                                 role="tabpanel">
                                <div class="panel-body">
                                    <div ng-repeat="(k, v) in bsisv.credentials" ng-if='bsisv.credentials'>
                                        <p><strong>{{k}}: </strong>{{v}}</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<style>
    .pan {
        padding-left: 10px;
    }

    .ban4 {
        width: 25%;
        float: left;
        /*text-align: center;*/
    }

    #t4:after {
        left: 80px;
    }
</style>